package com.longma.server.service;

import com.longma.server.constant.enums.PTZDirectionEnum;
import com.longma.server.constant.enums.PTZMirrorEnum;
import com.longma.server.constant.enums.PTZSpeedEnum;
import com.longma.server.constant.enums.ProtocolEnum;
import com.longma.server.pojo.UserResponseEntity;
import com.longma.server.pojo.vo.YingshiAddressVO;
import com.longma.server.pojo.vo.YingshiTokenVO;

/**
 * 萤石摄像头相关接口
 */
public interface IYingshiService {
    /**
     * 根据appKey和secret获取accessToken
     */
    UserResponseEntity<YingshiTokenVO> getAccessToken();

    /**
     * 获取播放地址
     */
    UserResponseEntity<YingshiAddressVO> getAddress(String accessToken, String deviceSerial, String validateCode, ProtocolEnum protocol,Boolean supportH265);

    /**
     * 添加设备到账号下
     */
    UserResponseEntity<String> addDevice(String accessToken,String deviceSerial,String validateCode);

    /**
     * 开始云台控制
     */
    UserResponseEntity<String> startPTZControl(String accessToken, String deviceSerial, PTZDirectionEnum direction, PTZSpeedEnum speed);

    /**
     * 停止云台控制
     */
    UserResponseEntity<String> stopPTZControl(String accessToken,String deviceSerial,PTZDirectionEnum direction);

    /**
     * 对设备进行镜像翻转操作(需要设备支持)
     */
    UserResponseEntity<String> mirrorPTZ(String accessToken, String deviceSerial, PTZMirrorEnum command);

    /**
     * 根据设备验证码关闭设备视频加密开关
     */
    UserResponseEntity<String> closeEncrypt(String accessToken,String deviceSerial,String validateCode);

    /**
     * 开启设备视频加密
     */
    UserResponseEntity<String> openEncrypt(String accessToken,String deviceSerial);
}
